package com.vanguard.client;

/**
 * @Title:
 * @Description:
 * @Author: vanguard
 * @Version: 1.0
 * @Date: 2018/12/27
 */
public class Main {
    public static void main(String[] args) {
        String host = "192.168.2.11";
        int port = 8111;
        String charset = "GBK";
        MinaClient client = new MinaClient(host, port, charset);
        String message = client.send("14");
        System.out.println("发送交易码11，接收到的报文消息为" + message);
        String message2 = client.send("11");
        System.out.println("发送交易码14,接收到的报文消息为" + message2);
        String message3 = client.send("13");
        String[] data = message3.split(";");
        int loopLength = Integer.parseInt(data[6]);
        StringBuffer stringBuffer = new StringBuffer();
        for(int i=0;i<loopLength;i++) {
            for(int j=0;j<5;j++) {
                stringBuffer.append(data[7+5*i+j]+";");
            }
            System.out.println("接收到的第" + (i+1) + "个循环体为" + stringBuffer.toString());
            stringBuffer.setLength(0);
        }

    }
}
